package org.travel.app.common.exception;

/**
 * @author nmm
 * @date 2024-10-2024/10/17
 * @deriction njm......
 */
public class GlobalException extends RuntimeException{
    private Integer errorCode;

    public GlobalException(ErrorsEnum errorsEnum) {
        super(errorsEnum.msg());
        this.errorCode = errorsEnum.code();
    }

    public Integer getCode() {
        return errorCode;
    }
}